#include "boost/di.hpp"
#include <iostream>
namespace di = boost::di;

class IService {
public:
    virtual void execute() = 0;
};

class ConcreteService : public IService {
public:
    void execute() override {
        std::cout << "ConcreteService::execute" << std::endl;
    }
};

class Client {
private:
    IService* service;

public:
    Client(IService* svc) : service(svc) {}

    void doSomething() {
        service->execute();
    }
};

int main() {
    auto injector = di::make_injector(
        di::bind<IService>.to<ConcreteService>()
    );

    auto client = injector.create<Client>();
    client.doSomething();

    return 0;
}